# Maintainer: David Heidelberg <david@ixit.cz>
pkgname=xf86-video-opentegra
pkgver=0.6.0_git20200423
pkgrel=0
pkgdesc="X.Org driver for NVIDIA tegra"
url="https://github.com/grate-driver/xf86-video-opentegra"
arch="armhf armv7"
license="MIT"
subpackages="$pkgname-doc"
depends="libdrm"
makedepends="libdrm-dev xorg-server-dev xproto fontsproto util-macros
	libtool m4 automake autoconf bison flex"
_commit="f8d8199d67530ee1419a70400f36e954ec2fcbd1"
source="$pkgname-$_commit.tar.gz::https://github.com/grate-driver/xf86-video-opentegra/archive/$_commit.tar.gz"
builddir="$srcdir"/$pkgname-$_commit

prepare() {
	export LDFLAGS="$LDFLAGS -Wl,-z,lazy"

	./autogen.sh \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr
}

build() {
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="6ce26e245c9ec2627f2999a5245db1d186f9f2b49d8a75852ac0e05bf83d73a22be3b7bc8480c74d3401f04d66b79ed440d4c391a60473884f1394ad113ef8d1  xf86-video-opentegra-f8d8199d67530ee1419a70400f36e954ec2fcbd1.tar.gz"
